package java69.work720;

public class Truck extends Car7 {
    protected static double payload;

    public Truck() {
    }

    public Truck(int wheels, double weight, int loader, double payload) {
        super(wheels, weight, loader);
        this.payload = payload;
    }

    public double getPayload() {
        return payload;
    }

    public void setPayload(double payload) {
        this.payload = payload;
    }
    public void show(double payload){
        setPayload(payload);
        System.out.println("车有"+super.getWheels()+"个轮子，重"+super.getWeight()+"kg,能载"+super.getLoader()+"人,可载重"+getPayload()+"吨");
    }
}
